package com.travel.admin.config;


import com.travel.admin.constants.App;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import java.util.UUID;


@Component
public class StartupCommandLineRunner implements CommandLineRunner {

	public void run(String... args) throws Exception {
		this.setAppId();
	}

	private void setAppId(){
		String id = UUID.randomUUID().toString().replace("-","");
		App.ID = id.substring(id.length() - 4);
	}
}